#include <stdio.h>
#define IN	1
#define	OUT	0


int main (int argc, const char * argv[]) {
	int c, nl, nw, nc, state;
	state = OUT;
	nl = nw = nc = 0;
	while ((c = getchar()) != EOF) {
		if (c == ' ' || c == '\n' || c == '\t') {
			putchar('\n');
			state = OUT;
		} else {
			putchar(c);
			if (state == OUT)
				state = IN;
		}
	}
	return 0;
}
